-
-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[plugin-rest-api] Introduce variableName parameter for FROM_JSON transformer #3718
Conversation
3d97cd8
to
34733d2
Compare
Codecov Report
@@ Coverage Diff @@
## master #3718 +/- ##
============================================
- Coverage 96.97% 89.45% -7.53%
- Complexity 6341 6348 +7
============================================
Files 862 862
Lines 17513 17521 +8
Branches 1145 1150 +5
============================================
- Hits 16984 15673 -1311
- Misses 422 1720 +1298
- Partials 107 128 +21
... and 69 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
...-plugin-rest-api/src/main/java/org/vividus/http/transformer/JsonRestApiTableTransformer.java
Outdated
Show resolved
Hide resolved
...-plugin-rest-api/src/main/java/org/vividus/http/transformer/JsonRestApiTableTransformer.java
Outdated
Show resolved
Hide resolved
...-plugin-rest-api/src/main/java/org/vividus/http/transformer/JsonRestApiTableTransformer.java
Outdated
Show resolved
Hide resolved
...-plugin-rest-api/src/main/java/org/vividus/http/transformer/JsonRestApiTableTransformer.java
Outdated
Show resolved
Hide resolved
...-plugin-rest-api/src/main/java/org/vividus/http/transformer/JsonRestApiTableTransformer.java
Outdated
Show resolved
Hide resolved
...-plugin-rest-api/src/main/java/org/vividus/http/transformer/JsonRestApiTableTransformer.java
Outdated
Show resolved
Hide resolved
...in-rest-api/src/test/java/org/vividus/http/transformer/JsonRestApiTableTransformerTests.java
Outdated
Show resolved
Hide resolved
2690288
to
1b4b7c8
Compare
...-plugin-rest-api/src/main/java/org/vividus/http/transformer/JsonRestApiTableTransformer.java
Outdated
Show resolved
Hide resolved
...-plugin-rest-api/src/main/java/org/vividus/http/transformer/JsonRestApiTableTransformer.java
Outdated
Show resolved
Hide resolved
assertThat(logger.getLoggingEvents(), is(List.of(getDeprecatedEvent(URL_PROPERTY, VARIABLE_NAME_PROPERTY) | ||
))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to reformat these lines of code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replaced with pure jupiter asseertions
...in-rest-api/src/test/java/org/vividus/http/transformer/JsonRestApiTableTransformerTests.java
Outdated
Show resolved
Hide resolved
{ | ||
when(variableContext.getVariable(VAR_NAME)).thenReturn(JSON_DATA); | ||
testTransform(parameter + VAR_NAME); | ||
assertThat(logger.getLoggingEvents(), expectedLogEvent); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assertThat(logger.getLoggingEvents(), expectedLogEvent); | |
assertThat(logger.getLoggingEvents(), is(expectedLogEvent)); |
and remove is
from test arguments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replaced with pure jupiter assertions
1a8fe57
to
c49e6c5
Compare
private static final String VARIABLE_PROPERTY = "variable"; | ||
private static final String VARIABLE_NAME_PROPERTY = "variableName"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no docs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
proper warning is added into docs on the same way as for url
@@ -58,9 +62,23 @@ public String transform(String tableAsString, TableParsers tableParsers, TablePr | |||
|
|||
String columns = properties.getMandatoryNonBlankProperty("columns", String.class); | |||
|
|||
boolean deprecatedNamePropertyPresent = properties.getProperties().getProperty(VARIABLE_PROPERTY) != null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
java.util.Properties#containsKey ?
7686156
to
daf980b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docs are lost now
Closes #3642